# -*- coding: utf-8 -*-

import telnetlib


def check_ip(url, timeout=3):
    url_info = url.split(':')
    try:
        telnetlib.Telnet(url_info[0], url_info[1], timeout=timeout)
        return True
    except:
        return False
